C1.LiveLinq.AdoNet Namespace / AdoNetExtensions Class / IndexedField Method / IndexedField<T>(DataRow,Int32) Method
The type of the data column
The data row.
The zero-based ordinal position of the column.
Example

IndexedField<T>(DataRow,Int32) Method
A hint to create and use an index on the specified data column. The hint has default action.
Syntax
'Declaration
 
Public Overloads Shared Function IndexedField(Of T)( _
   ByVal row As System.Data.DataRow, _
   ByVal columnIndex As System.Integer _
) As T
 

Parameters

row
The data row.
columnIndex
The zero-based ordinal position of the column.

Type Parameters

T
The type of the data column

Return Value

The data column value.
Remarks
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See C1.LiveLinq.Hints for more details.
Example
var query = from c in customersTable
    where c.IndexedField<string>(0) == "ALFKI"
    select c;
See Also